# Contributor: Jonah Brüchert <jbb@kaidan.im>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=plasma-angelfish
pkgver=1.5.1
pkgrel=0
pkgdesc="Small Webbrowser for Plasma Mobile"
arch="all !ppc64le !s390x !armhf !mips !mips64" # mips, ppc64le and s390x blocked by qt5-qtwebengine, armhf blocked by kirigami2 -> qt5-qtdeclarative-dev
url="https://phabricator.kde.org/source/plasma-angelfish/"
license="GPL-3.0-or-later"
depends="qt5-qtquickcontrols2 kirigami2 plasma-framework purpose"
makedepends="cmake qt5-qtwebengine-dev kdeclarative-dev kirigami2-dev plasma-framework-dev kio-dev ki18n-dev extra-cmake-modules purpose-dev"
source="$pkgname-$pkgver.tar.gz::https://invent.kde.org/kde/plasma-angelfish/-/archive/v$pkgver/plasma-angelfish-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	cmake -B "$builddir"/build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True
	make -C build
}

check() {
	cd "$builddir"/build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="99a9d2fecad07ce4c8ebc39847ec6d006f1ca212c597738f42e9f84c5a06d960eeb17089edcd2671ea8ab133c41d3834155118c5d975a9bc6de7e6f9d18a72f5  plasma-angelfish-1.5.1.tar.gz"
